import React from 'react'
import {NavLink, Outlet} from "react-router-dom"
import {Homechildren} from "../../router"
import { Tabbar } from 'react-vant';
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons'

function Home() {
  console.log(Homechildren);
  let tabbar = Homechildren.filter(v=>v.tit) // 过滤出来有tit属性的
  console.log(tabbar);
  return (
      <>
        <Outlet></Outlet>

        <Tabbar>
            {
                   tabbar.map((item,index)=>{
                      return   <Tabbar.Item icon={item.icon} key={index}>
                            <NavLink to={item.path}>{item.tit}</NavLink>
                      </Tabbar.Item>
                  })
            }
         </Tabbar>

      </>
  )
}

export default Home